﻿<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>ITO 职业能力实训工程实验平台</title>
    <link rel="stylesheet" href="${ctx}/static/css/teacher/css/main.css">
    
    <link  href="${ctx}/static/css/index.css" rel="stylesheet" type="text/css" /> 
    <link  href="${ctx}/static/ligerui/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" /> 
   
    <script src="${ctx}/static/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>    
    <script src="${ctx}/static/ligerui/lib/ligerUI/js/ligerui.min.js" type="text/javascript"></script> 
    
    <link href="${ctx}/static/ligerui/lib/css/common.css" rel="stylesheet" type="text/css" />  
    <link href="${ctx}/static/ligerui/lib/css/index.css" rel="stylesheet" type="text/css" />
    
    <script src="${ctx}/static/ligerui/lib/js/LG.js" type="text/javascript"></script>
    <script src="${ctx}/static/ligerui/lib/js/login.js" type="text/javascript"></script>
    <script src="${ctx}/static/js/main.js" type="text/javascript"></script>
    <script src="${ctx}/static/js/common.js" type="text/javascript"></script>
      
</head>
  <body>
    <div class="page">
      <div class="header fix">
        <a href="" class="l header-logo" title="首页">
          <h1>ITO 职业能力实训工程实验平台</h1>
        </a>
        <div class="r header-nav">
          <span class="login-info">欢迎您，教师！</span>
          <a href="" class="monitor">画面监控</a>
          <span class="separator">|</span>
          <a href="" class="teaching">课程教学</a>
          <span class="separator">|</span>
          <a href="" class="guide">指导</a>
        </div>
      </div> <!-- .header END -->

      <div class="content fix">
        <div class="side l">
          <div class="nav">
            <strong class="home"><a href="">首页</a></strong>
            <strong class="education"><a href="">教务管理</a></strong>
              <div class="sub-nav">
                <a href="">学年设定</a>
                <a href="" class="on">年级设定</a>
                <a href="">科系设定</a>
                <a href="">班级设定</a>
                <a href="">课程设定</a>
                <a href="">教室设定</a>
                <a href="">老师设定</a>
              </div>
            <strong class="privilege"><a href="">权限管理</a></strong>
            <strong class="course"><a href="">课程管理</a></strong>
            <strong class="student"><a href="">学生管理</a></strong>
            <strong class="textbook"><a href="">教材管理</a></strong>
            <strong class="classroom"><a href="">课堂管理</a></strong>
            <strong class="profile"><a href="">个人资料</a></strong>
          </div> <!-- .nav END -->
        </div> <!-- .side END -->

        <div class="main r">
          <div class="main-bd rel">
            <div class="tabs fix">
              <a href="" class="on">桌面</a>
              <a href="">基本课表</a>
            </div>
            <div class="search">
              <form action="" class="fix">
                <div class="item">
                  <label for="search-code">代码： <input name="code" id="search-code"></label>
                </div>
                <div class="item">
                  <label for="search-name">名称： <input name="name" id="search-name"></label>
                </div>
                <div class="action">
                  <button type="submit">查询</button>
                </div>
              </form>
            </div> <!-- .search END -->
            <div class="actions fix">
              <a class="add">新增</a>
              <a class="modify">修改</a>
              <a class="copy">复制</a>
            </div>
            <div class="data">
              <table>
                <tr>
                  <th class="checkbox"><input type="checkbox"></th>
                  <th class="code">代码</th>
                  <th class="name">名称</th>
                  <th class="action">启用</th>
                </tr>
                <tr class="hili">
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
                <tr>
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
                <tr class="hili">
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
                <tr>
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
                <tr class="hili">
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
                <tr>
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
                <tr class="hili">
                  <td><input type="checkbox"></td>
                  <td>BT009</td>
                  <td>本科日间部</td>
                  <td><span class="on"></span></td>
                </tr>
              </table>
            </div> <!-- .data END -->
          </div> <!-- .main-bd END -->
        </div> <!-- .main END -->
      </div> <!-- .content END -->
    </div>
  </body>
  
  
<body style="text-align:center; background:#F0F0F0; overflow:hidden;">
    <div id="pageloading" style="display:block;"></div> 
    <div id="topmenu" class="l-topmenu">
        <div class="l-topmenu-logo">WPF</div>
        <div class="l-topmenu-welcome"> 
            <span class="l-topmenu-username"></span>欢迎您  &nbsp; 
            [<a href="javascript:f_changepassword()">修改密码</a>] &nbsp;
            [<a href="javascript:LG.login()">切换用户</a>]
            [<a href="${ctx }/logout">退出</a>] 
        </div> 
        
    </div> 
     <div id="mainbody" class="l-mainbody" style="width:99.2%; margin:0 auto; margin-top:3px;" >
        <div position="left" title="主要菜单" id="mainmenu"></div>  
        <div position="center" id="framecenter"> 
            <div tabid="home" title="我的主页"> 
                <iframe frameborder="0" name="home" id="home" src="${ctx }/welcome"></iframe>
            </div> 
        </div> 
    </div>
    <div class="l-hidden"></div>
    <script type="text/javascript">

        //tabid计数器，保证tabid不会重复
        var tabidcounter = 0;
        //窗口改变时的处理函数
        function f_heightChanged(options) {
            if (tab)
                tab.addHeight(options.diff);
            if (accordion && options.middleHeight - 24 > 0)
                accordion.setHeight(options.middleHeight - 24);
        }
        //增加tab项的函数
        function f_addTab(tabid, text, url) {
            if (!tab) return;
            if (!tabid)
            {
                tabidcounter++;
                tabid = "tabid" + tabidcounter; 
            }
            tab.addTabItem({ tabid: tabid, text: text, url: url });
        }
        //修改密码
        function f_changepassword()
        {
            LG.changepassword();
        }
        $(document).ready(function ()
        {

            //菜单初始化
            $("ul.menulist li").live('click', function ()
            {
                var jitem = $(this);
                var tabid = jitem.attr("tabid");
                var url = jitem.attr("url");
                if (!url) return;
                if (!tabid)
                {
                    tabidcounter++;
                    tabid = "tabid" + tabidcounter;
                    jitem.attr("tabid", tabid);
                    jitem.attr("url", url);
                }
                f_addTab(tabid, $("span:first", jitem).html(), url);
            }).live('mouseover', function ()
            {
                var jitem = $(this);
                jitem.addClass("over");
            }).live('mouseout', function ()
            {
                var jitem = $(this);
                jitem.removeClass("over");
            });

            //布局初始化 
            //layout
            layout = $("#mainbody").ligerLayout({ height: '100%', heightDiff: -3, leftWidth: 140, onHeightChanged: f_heightChanged, minLeftWidth: 120 });
            var bodyHeight = $(".l-layout-center:first").height();
            //Tab
            tab = $("#framecenter").ligerTab({ height: bodyHeight, contextmenu: true });


            //预加载dialog的背景图片
            LG.prevDialogImage();

            var mainmenu = $("#mainmenu");

            $.getJSON('${ctx}/myMenus?rnd='+Math.random(), function (menus)
            {
            	var menuJsons=toAccordion(menus);
                $(menuJsons).each(function (i, menu)
                {
                    var item = $('<div title="' + menu.name + '"><ul class="menulist"></ul></div>');

                    $(menu.children).each(function (j, submenu)
                    {
                        var subitem = $('<li><img/><span></span><div class="menuitem-l"></div><div class="menuitem-r"></div></li>');
                        subitem.attr({
                            url: submenu.muHref,
                            menuno: submenu.muRel
                        });
                        $("img", subitem).attr("src","${ctx}/static/"+ submenu.muIcon);
                        $("span", subitem).html(submenu.name);

                        $("ul:first", item).append(subitem);
                    });
                    mainmenu.append(item);

                });

                //Accordion
                accordion = $("#mainmenu").ligerAccordion({ height: bodyHeight - 24, speed: null });



                $("#pageloading").hide();
            });

/**
 *             LG.ajax({
     type: 'AjaxMemberManage',
     method: 'GetCurrentUser',
     success: function (user)
     {
         $(".l-topmenu-username").html(user.Title + "，");
     },
     error: function ()
     {
         LG.tip('用户信息加载失败');
     }
 });
 */
        });
    </script>
</body>
</html>